diff -Nur ralcgm-3.50.orig/CGMconfig ralcgm-3.50/CGMconfig
--- ralcgm-3.50.orig/CGMconfig	Tue Apr 19 11:42:17 1994
+++ ralcgm-3.50/CGMconfig	Mon Mar 19 23:10:54 2001
@@ -111,13 +111,13 @@
    echo; exit
 fi
 
-systems='sun3|sun4|cray|craypcc|iris|iris4d|indigo|rs6000|hpux|ultrix|decosf|topaz'
+systems='sun3|sun4|cray|craypcc|iris|iris4d|indigo|rs6000|hpux|ultrix|decosf|topaz|linux'
 
 #
 # Set the echo options - check the system.
 #
 case $1 in
-sun3|sun4|iris|ultrix|dec|rs6000)
+sun3|sun4|iris|ultrix|dec|rs6000|linux)
 #  Berkely echo format
                 el="-n"
                 er=""
@@ -269,6 +269,14 @@
       cflags="-c -O -m68881"
       lflags="-lE -lmalloc -lm"
       ;;
+linux)
+      system=linux
+      cflags="-c ${OPT}"
+      lflags="-lm"
+      xw="yes"
+      xlib="-lX11"
+      ar="ar crs"
+      ;;
 esac
 
 #
@@ -672,31 +680,31 @@
 echo Your desired system will now be configured.
 echo
 
-oututils="$(ATTUTILS)"
+oututils='$(ATTUTILS)'
 
 if test "$gdpflag" = "yes"
 then
-   oututils=$oututils" $(GDPUTILS)"
+   oututils=$oututils' $(GDPUTILS)'
 fi
 
 if test "$filflag" = "yes"
 then
-   oututils=$oututils" $(FILUTILS)"
+   oututils=$oututils' $(FILUTILS)'
 fi
 
 if test "$colrflag" = "yes"
 then
-   oututils=$oututils" $(COLRUTILS)"
+   oututils=$oututils' $(COLRUTILS)'
 fi
 
 if test "$cellflag" = "yes"
 then
-   oututils=$oututils" $(CELLUTILS)"
+   oututils=$oututils' $(CELLUTILS)'
 fi
 
 if test "$ptsflag" = "yes"
 then
-   oututils=$oututils" $(PTSUTILS)"
+   oututils=$oututils' $(PTSUTILS)'
 fi
 
 sed "/^MODULE =/s!=.*\$!= $module!
diff -Nur ralcgm-3.50.orig/CGMinstall ralcgm-3.50/CGMinstall
--- ralcgm-3.50.orig/CGMinstall	Tue Apr 19 11:42:17 1994
+++ ralcgm-3.50/CGMinstall	Mon Mar 19 23:10:54 2001
@@ -111,13 +111,13 @@
    echo; exit
 fi
 
-systems='sun3|sun4|cray|craypcc|iris|iris4d|indigo|rs6000|hpux|ultrix|decosf|topaz'
+systems='sun3|sun4|cray|craypcc|iris|iris4d|indigo|rs6000|hpux|ultrix|decosf|topaz|linux'
 
 #
 # Set the echo options - check the system.
 #
 case $1 in
-sun3|sun4|iris|ultrix|dec|rs6000)
+sun3|sun4|iris|ultrix|dec|rs6000|linux)
 #  Berkely echo format
                 el="-n"
                 er=""
@@ -269,6 +269,14 @@
       cflags="-c -O -m68881"
       lflags="-lE -lmalloc -lm"
       ;;
+linux)
+      system=linux
+      cflags="-c ${OPT}"
+      lflags="-lm"
+      xw="yes"
+      xlib="-lX11"
+      ar="ar crs"
+      ;;
 esac
 
 #
@@ -672,31 +680,31 @@
 echo Your desired system will now be configured.
 echo
 
-oututils="$(ATTUTILS)"
+oututils='$(ATTUTILS)'
 
 if test "$gdpflag" = "yes"
 then
-   oututils=$oututils" $(GDPUTILS)"
+   oututils=$oututils' $(GDPUTILS)'
 fi
 
 if test "$filflag" = "yes"
 then
-   oututils=$oututils" $(FILUTILS)"
+   oututils=$oututils' $(FILUTILS)'
 fi
 
 if test "$colrflag" = "yes"
 then
-   oututils=$oututils" $(COLRUTILS)"
+   oututils=$oututils' $(COLRUTILS)'
 fi
 
 if test "$cellflag" = "yes"
 then
-   oututils=$oututils" $(CELLUTILS)"
+   oututils=$oututils' $(CELLUTILS)'
 fi
 
 if test "$ptsflag" = "yes"
 then
-   oututils=$oututils" $(PTSUTILS)"
+   oututils=$oututils' $(PTSUTILS)'
 fi
 
 sed "/^MODULE =/s!=.*\$!= $module!
diff -Nur ralcgm-3.50.orig/include/cgmmach.h ralcgm-3.50/include/cgmmach.h
--- ralcgm-3.50.orig/include/cgmmach.h	Mon Jun 12 15:18:12 1995
+++ ralcgm-3.50/include/cgmmach.h	Mon Mar 19 23:10:54 2001
@@ -87,6 +87,9 @@
 #ifndef Double
 #define Double  double
 #endif
+#ifndef Posint64
+#define Posint64 unsigned long
+#endif
 
 /* Define macros for some maths routines which may cause problems */
 
diff -Nur ralcgm-3.50.orig/include/mc_linux.h ralcgm-3.50/include/mc_linux.h
--- ralcgm-3.50.orig/include/mc_linux.h	Thu Jan  1 01:00:00 1970
+++ ralcgm-3.50/include/mc_linux.h	Mon Mar 19 23:10:54 2001
@@ -0,0 +1,33 @@
+/*  RAL-CGM Interpreter header file
+ *
+ *  Linux specific setting for CGM interpreter
+ */
+
+/*  Define Machine  */
+
+#define LINUX
+
+/*  Define Graphics system(s)  */
+
+#define POSTSCRIPT
+#define BEZIER
+#define HERSHEY
+#define XW
+
+#define DATADIR ""
+
+#define NAMELGTH  32
+#define EXTLGTH    8
+
+#define Posint64 unsigned long long
+#define MALLOCH
+#include <stdlib.h>
+
+#ifdef CGMOXW_C      /* X-Window specific settings  */
+
+#include <X11/cursorfont.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+
+#endif
diff -Nur ralcgm-3.50.orig/src/cgmobin.c ralcgm-3.50/src/cgmobin.c
--- ralcgm-3.50.orig/src/cgmobin.c	Fri Jun 16 15:10:19 1995
+++ ralcgm-3.50/src/cgmobin.c	Mon Mar 19 23:11:52 2001
@@ -1593,7 +1593,8 @@
 Enum real_type, real_or_vdc;
 #endif
 {
-   Posint whole, exponent, fract, neg;
+   Posint whole, exponent, neg;
+   Posint64 fract;
    Prec prec;
    Double f;
 
@@ -1610,7 +1611,7 @@
       prec = (real_or_vdc == VDC ? curbin.vdc_whole
                                  : curbin.real_whole);
       whole = (Posint)( neg ? -((floor(x))) : x );
-      fract = (Posint)( ( neg ? x + (Double)whole : x - (Double)whole )
+      fract = (Posint64)( ( neg ? x + (Double)whole : x - (Double)whole )
                             * ( 1L<<prec-2 ) * 4.0 );
 
 #ifdef DEBUG
@@ -1669,7 +1670,7 @@
                exponent--;
             }
          }
-         fract = (Long) ( (f - 1.0) * (Double)(1L<<(prec == 12 ? 52 : 23)) );
+         fract = (Posint64) ( (f - 1.0) * (Double)(1L<<(prec == 12 ? 52 : 23)) );
       }
 
 #ifdef DEBUG
diff -Nur ralcgm-3.50.orig/src/cgmrand.c ralcgm-3.50/src/cgmrand.c
--- ralcgm-3.50.orig/src/cgmrand.c	Tue Jun 13 17:32:50 1995
+++ ralcgm-3.50/src/cgmrand.c	Mon Mar 19 23:10:54 2001
@@ -349,7 +349,11 @@
 /* Correct any overrun */
    if(cgmoverrun)
    {
+#ifdef LINUX
+      disk_addr.__pos -= cgmoverrun;
+#else
       disk_addr -= cgmoverrun;
+#endif
       cgmoverrun = 0;
    }
 
